package com.chinacoal.microservice.api.model.entity;

import java.io.Serializable;

import javax.validation.constraints.NotBlank;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.chinacoal.microservice.model.common.Entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ccms_utask_attr")
@ApiModel(value="待办属性实体",description="待办属性实体")
public class UtaskAttrEntity extends Entity<UtaskAttrEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value ="主键id", example="", required=false)
    @NotBlank(message = "更新时，主键不能为空: attrId", groups = {UpdateValid.class})
    @TableId("attr_id")
    private String attrId;
    
    @ApiModelProperty(value ="属性编码", example="", required=true)
    @NotBlank(message = "属性编码不能为空: attrCode")
    @TableField("attr_code")
    private String attrCode;

    @ApiModelProperty(value ="属性名称", example="", required=true)
    @NotBlank(message = "属性名称不能为空: attrName")
    @TableField("attr_name")
    private String attrName;

    @ApiModelProperty(value ="系统码", example="", required=false)
    @TableField("client_id")
    private String clientId;

    @ApiModelProperty(value ="备用1", example="", required=false)
    @TableField("custom1")
    private String custom1;

    @ApiModelProperty(value ="备用2", example="", required=false)
    @TableField("custom2")
    private String custom2;

    @ApiModelProperty(value ="备用3", example="", required=false)
    @TableField("custom3")
    private String custom3;

    @ApiModelProperty(value ="备用4", example="", required=false)
    @TableField("custom4")
    private String custom4;

    @ApiModelProperty(value ="备用5", example="", required=false)
    @TableField("custom5")
    private String custom5;

    @Override
    protected Serializable pkVal() {
        return this.attrId;
    }
}
